package cn.huanzi.qch.springbootmybatis.dingding;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @author keven
 * @date 2023-02-09 11:40 上午
 * @Description
 */
@Configuration
public class DingTalkConfig {


    /**
     * 是否启用钉钉群机器人通知（默认否）
     */
    @Value("${notify.dingtalk.enable:false}")
    private boolean robotEnable;

    /**
     * 钉钉群机器人所给URL后面的access_token参数值
     */
    @Value("${notify.dingtalk.access-token:}")
    private String accessToken;

    /**
     * 钉钉群机器人的签名秘钥
     */
    @Value("${notify.dingtalk.sign-secret:}")
    private String signSecret;

    /**
     * 是否加签名（默认是）
     */
    @Value("${notify.dingtalk.enable-signature:true}")
    private boolean enableSignature;

    public boolean isRobotEnable() {
        return robotEnable;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public String getSignSecret() {
        return signSecret;
    }

    public boolean isEnableSignature() {
        return enableSignature;
    }

}
